Skip to content

fix(server): repair summary search after snapshots and project adoption - #163

Merged
ScriptedAlchemy merged 2 commits into
mainfrom
fix/deep-summary-search-audit-2026-11-18
Nov 19, 2026
Merged

ScriptedAlchemy merged 2 commits into
mainfrom
fix/deep-summary-search-audit-2026-11-18

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

The audit found four ways conversation summaries could become unavailable or keep generating work without converging:

  • Development snapshots copied canonical summary rows without their FTS index. The already-recorded migration would not rebuild it.
  • After project adoption, stable summary IDs collided with rows owned by the old project. A complete summary tree repeatedly reported more work.
  • Retry eligibility, model recovery, and retry-budget reset followed the pass's historical project instead of the thread's current project. A deleted or disabled old project could strand an adopted thread.
  • A delayed source verifier could scrub a freshly regenerated summary. A project guard alone was insufficient: source reversion can reproduce the same ID, public contents, and timestamp in the same project.

Snapshots now rebuild summary FTS from canonical rows and integer-ID mappings, preserving scrub exclusions. Publication can replace an adopted thread's summaries after canonical revalidation while retaining stable IDs. Retry and settings recovery use the current thread project while keeping historical pass provenance. Scrubbing also matches an internal publication revision, so a stale verifier cannot mutate a newer publication. Legacy rows without that revision remain supported.

The revision is private storage metadata. Public summary contracts, IDs, source digests, and model-facing text are unchanged; bounded metadata scans still avoid loading statement bodies.

Verification

Every defect has a regression that failed before its corresponding source fix:

  • Snapshot source/destination MATCH, retained IDs, pruned rows, and current/legacy scrub exclusions.
  • Single-summary adoption and a complete 600-item summary tree: stable IDs, correct project ownership, parent/child reads, exact-source expansion, destination search, no old-project hits, and no further model calls after convergence.
  • Leaf and roll-up recovery under destination-project settings, including retry-budget reset after disable/re-enable.
  • A delayed old-project verifier racing destination publication.
  • Two same-project source-reversion cases, including a legacy row without a revision. The tests assert that the new public payload exactly equals the original, release the stale verifier, and verify the new summary remains available.

Final owning suites: 56 summary tests and 12 snapshot tests. On the final publication tree, vp run check:changed 09efb428b74ef6a1d22be25bdba9c62f8a180669 --concurrency 1 passed native build, formatting, lint, both full Knip scans, GraphQL generation, and 70 tests across three files, including Agent Context Budget.

The cached compiler launcher cannot initialize seccomp_unotify in this environment, so that gate invocation exits nonzero. All three affected packages passed their configured effect-tsgo tsrs --noEmit checks directly: server, evals, and scripts. No compiler settings, CI checks, or budget gates were weakened.

Independent review covered the publication and retry changes, the revision guard, and the regressions. The GitHub tree was checked equal to the locally validated tree.

GitHub Fork CI, including final Fork Check, Agent Context Budget, and every other applicable check must pass on the exact published head before merge. Generation uses deterministic model fixtures; private/live-model execution is not claimed.

Implemented and verified with GPT-6 Astra Pro / ChatGPT.

@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bac1b8b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Integrate reviewed main. Recover summary work in the current project and prevent delayed verification from scrubbing a newer publication, including source reversion and legacy rows.
@ScriptedAlchemy
ScriptedAlchemy merged commit cf81dfb into main Nov 19, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant